#pragma once
#include "BRTree.h"

namespace MySet {
	template <class K>
	class set {
		struct SetKeyOfT {
			const K& operator()(const K& data) {
				return data;
			}
		};
		typedef BRTree<const K, K, SetKeyOfT> tree;
	public:
		typedef typename BRTree<const K, K, SetKeyOfT>::iterator iterator;
		typedef typename BRTree<const K, K, SetKeyOfT>::const_iterator const_iterator;
		iterator begin() {
			return _t.begin();
		}

		iterator end() {
			return _t.end();
		}

		const_iterator begin() const {
			return _t.begin();
		}

		const_iterator end() const {
			return _t.end();
		}

		pair<iterator, bool> insert(const K& data) {
			return _t.insert(data);
		}

	private:
		tree _t;
	};
}